package com.hspedu.homework.homework3;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/1/24
 * @time 18:51
 */
public class Homework03 {
    public static void main(String[] args) {
        Teacher teacher = new Professor("jack",60,10000, "professor");
        System.out.println(teacher.introduce());
    }
}

class Teacher{
    private String name;
    private int age;
    private double salary;
    private String post;

    public Teacher(String name, int age, double salary, String post) {
        this.name = name;
        this.age = age;
        this.salary = salary;
        this.post = post;
    }

    public String introduce(){
        return this.name + " " + this.age + " " +this.post + " " + this.salary;
    }
}

class Professor extends Teacher{
    public Professor(String name, int age, double salary, String post) {
        super(name, age, salary, post);
    }

    @Override
    public String introduce() {
        return super.introduce() + "  工资级别1.3";
    }
}

class AdjunctPro extends Teacher{
    public AdjunctPro(String name, int age, double salary, String post) {
        super(name, age, salary, post);
    }
    @Override
    public String introduce() {
        return super.introduce() + "工资级别1.2";
    }
}

class Lecture extends Teacher{
    public Lecture(String name, int age, double salary, String post) {
        super(name, age, salary, post);
    }
    @Override
    public String introduce() {
        return super.introduce() + "工资级别1.1";
    }
}
